using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

namespace Umdf.SideShow.Contents
{
    public abstract class Content : SideShowObject
    {
        private uint _id;

        protected Content()
        {
        }

        protected Content(uint id)
        {
            _id = id;
        }

        public uint Id
        {
            get { return _id; }
        }

        public abstract void Save(string dir);

        protected internal override void DeserializeObject(System.IO.BinaryReader reader)
        {
            base.DeserializeObject(reader);
            _id = reader.ReadUInt32();
        }

        protected internal override void SerializeObject(System.IO.BinaryWriter writer)
        {
            base.SerializeObject(writer);
            writer.Write(_id);
        }
    }
}
